package com.jic.veteran.common.service.impl;

import com.jic.veteran.common.leaf.LeafSegmentIdBuilder;
import com.jic.veteran.common.leaf.LeafSnowflakeIdBuilder;
import com.jic.veteran.common.service.IdService;
import org.springframework.stereotype.Service;

@Service
public class IdServiceImpl implements IdService {
    @Override
    public String generateProjectId() {
        return LeafSegmentIdBuilder.getInstance().generateId("leaf-segment-project_id");
    }

    @Override
    public String generateReqsn() {
        return LeafSegmentIdBuilder.getInstance().generateId("leaf-segment-reqsn");
    }

    @Override
    public String generateSnowflakeId() {
        return LeafSnowflakeIdBuilder.getInstance().generateId("qdrjq");
    }
}
